package com.yanq.liancar.adapter;
/*
 *  @创建者     Administrator
 *  @创建时间   2018/11/29  16:44
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.ProtocolListBean;

import java.util.List;

public class ProtocolAdapter extends BaseQuickAdapter<ProtocolListBean.DataBean, BaseViewHolder> {
    public ProtocolAdapter(int layoutResId, @Nullable List<ProtocolListBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ProtocolListBean.DataBean item) {
        helper.setText(R.id.tv_protocolName,item.getProtocol_name());
        TextView textView=helper.getView(R.id.tv_status);
        if (item.getSignStatus()==0){
            textView.setText("已签约");
            textView.setTextColor(mContext.getResources().getColor(R.color.green));
        }else {
            textView.setText("未签约");
            textView.setTextColor(mContext.getResources().getColor(R.color.red));
        }
    }
}
